//
//  ALPTabButton.m
//  AlpFM
//
//  Created by KING on 16/1/26.
//  Copyright © 2016年 Alp. All rights reserved.
//

#import "ALPTabButton.h"
#import "ALPPlayViewController.h"
@implementation ALPTabButton



//重写系统方法设置image在button上的位置
- (CGRect)imageRectForContentRect:( CGRect )contentRect
{
    
    CGFloat imageW = contentRect. size . width ;
    
    CGFloat imageH = contentRect. size . height * 1 ;
    
    return CGRectMake ( 0 , 0 , imageW, imageH);
    
}


#pragma mark 设置Button内部的title的范围
//重写系统方法设置title在button上的位置
- (CGRect)titleRectForContentRect:( CGRect )contentRect
{
    
    CGFloat titleY = contentRect. size . height * 0.6 ;
    
    CGFloat titleW = contentRect. size . width ;
    
    CGFloat titleH = contentRect. size . height - titleY;
    
    return CGRectMake ( 0 , titleY, titleW, titleH);
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
